<div id="content" class="hfeed">
    <div class="page hentry entry">
        <div class="post-wrap">
            <div class="entry-content">

                <h2>View</h2>
                <dl>
                		<dt><?php echo __('Warehouse Id'); ?></dt>
                		<dd>
                			<?php echo h($warehouse['Warehouse']['id']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Warehouse Name'); ?></dt>
                		<dd>
                			<?php echo h($warehouse['Warehouse']['warehouse_name']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Warehouse Address'); ?></dt>
                		<dd>
                			<?php echo h($warehouse['Warehouse']['warehouse_address']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Warehouse Phone'); ?></dt>
                		<dd>
                			<?php echo h($warehouse['Warehouse']['warehouse_phone']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Warehouse Description'); ?></dt>
                		<dd>
                			<?php echo h($warehouse['Warehouse']['warehouse_description']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Quantity Max'); ?></dt>
                		<dd>
                			<?php echo h($warehouse['Warehouse']['quantity_max']); ?>
                			&nbsp;
                		</dd>
                	</dl>

                <div class="related">
                	<h3><?php echo __('Related Products'); ?></h3>
                	<?php if (!empty($warehouse['Product'])): ?>
                	<table cellpadding = "0" cellspacing = "0">
                	<tr>
                		<th><?php echo __('Product Id'); ?></th>
                		<th><?php echo __('Product Code'); ?></th>
                		<th><?php echo __('Warehouse Id'); ?></th>
                		<th><?php echo __('Purchase Detail Id'); ?></th>
                		<th><?php echo __('Sales Detail Id'); ?></th>
                		<th><?php echo __('Mobile Model Id'); ?></th>
                		<th><?php echo __('Serial Number'); ?></th>
                		<th class="actions"><?php echo __('Actions'); ?></th>
                	</tr>
                	<?php foreach ($warehouse['Product'] as $product): ?>
                		<tr>
                			<td><?php echo $product['product_id']; ?></td>
                			<td><?php echo $product['product_code']; ?></td>
                			<td><?php echo $product['id']; ?></td>
                			<td><?php echo $product['purchase_detail_id']; ?></td>
                			<td><?php echo $product['sales_detail_id']; ?></td>
                			<td><?php echo $product['mobile_model_id']; ?></td>
                			<td><?php echo $product['serial_number']; ?></td>
                			<td class="actions">
                				<?php echo $this->Html->link(__('View'), array('controller' => 'products', 'action' => 'view', $product['product_id'])); ?>
                				<?php echo $this->Html->link(__('Edit'), array('controller' => 'products', 'action' => 'edit', $product['product_id'])); ?>
                				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'products', 'action' => 'delete', $product['product_id']), array(), __('Are you sure you want to delete # %s?', $product['product_id'])); ?>
                			</td>
                		</tr>
                	<?php endforeach; ?>
                	</table>
                <?php endif; ?>

                	<div class="actions">
                		<ul>
                			<li><?php echo $this->Html->link(__('New Product'), array('controller' => 'products', 'action' => 'add')); ?> </li>
                		</ul>
                	</div>
                </div>

            </div>
        </div>
    </div>
</div>
<div id="sidebar" class="sidebar">
    <div class="widget">
        <h4>Function</h4>
        <ul class="menu">
            <li><?php echo $this->Html->link(__('Edit Warehouse'), array('action' => 'edit', $warehouse['Warehouse']['id'])); ?> </li>
            		<li><?php echo $this->Form->postLink(__('Delete Warehouse'), array('action' => 'delete', $warehouse['Warehouse']['id']), array(), __('Are you sure you want to delete # %s?', $warehouse['Warehouse']['id'])); ?> </li>
            		<li><?php echo $this->Html->link(__('List Warehouses'), array('action' => 'index')); ?> </li>
            		<li><?php echo $this->Html->link(__('New Warehouse'), array('action' => 'add')); ?> </li>
        </ul>
    </div>
</div>

